package com.tabjin.rfidsocket.mapper.mapper;

import com.tabjin.rfidsocket.pojo.SysRoleUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysRoleUserCustomMapper {

    /**
     * 获取角色id列表
     *
     * @param userId
     * @return
     */
    List<Integer> getRoleIdListByUserId(@Param("userId") Integer userId);

    /**
     * 指定权限点获取用户id列表
     *
     * @param aclId
     * @return
     */
    List<Integer> getUserIdListByAclId(@Param(value = "aclId") Integer aclId);

    /**
     * 批量新增
     *
     * @param sysRoleUserList
     */
    void batchInsert(@Param(value = "roleUserList") List<SysRoleUser> sysRoleUserList);

    List<Integer> getUserIdListByRoleId(@Param("roleId") int roleId);

    List<Integer> getUserIdListByRoleIdList(@Param(value = "roleIdList") List<Integer> roleIdList);

    void deleteByRoleId(@Param("roleId") int roleId);
}